﻿namespace Storyteller.Framework.Graphics.Particles.Modifiers
{
	public class AlphaModifier : ParticleModifier
	{
		public float InitialAlpha { get; set; }
		public float FinalAlpha { get; set; }

		public override void Process(float deltaSeconds, Particle[] particles, int count)
		{
			for (int i = 0; i < count; i++)
			{
				particles[i].Color.A = (InitialAlpha + ((FinalAlpha - InitialAlpha) * particles[i].Lifetime));
			}
		}
	}
}
